package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import java.util.Date;
import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.TaskExample.E_DESCRIPTION;
import static org.jsola.hr.example.TaskExample.E_RUN_BEAN_NAME;
import static org.jsola.hr.example.TaskExample.E_RUN_DATE;
import static org.jsola.hr.example.TaskExample.E_RUN_PARAM;
import static org.jsola.hr.example.TaskExample.E_RUN_TYPE;
import static org.jsola.hr.example.TaskExample.E_STATUS;
import static org.jsola.hr.example.TaskExample.E_SUBJECT_ID;
import static org.jsola.hr.example.TaskExample.E_SUBJECT_TYPE;
import static org.jsola.hr.example.TaskExample.M_DESCRIPTION_MAX;
import static org.jsola.hr.example.TaskExample.M_RUN_BEAN_NAME_MAX;
import static org.jsola.hr.example.TaskExample.M_RUN_BEAN_NAME_NOT_NULL;
import static org.jsola.hr.example.TaskExample.M_RUN_DATE_NOT_NULL;
import static org.jsola.hr.example.TaskExample.M_RUN_PARAM_MAX;
import static org.jsola.hr.example.TaskExample.M_RUN_TYPE_MAX;
import static org.jsola.hr.example.TaskExample.M_SUBJECT_ID_MAX;
import static org.jsola.hr.example.TaskExample.M_SUBJECT_ID_NOT_NULL;
import static org.jsola.hr.example.TaskExample.M_SUBJECT_TYPE_MAX;
import static org.jsola.hr.example.TaskExample.M_SUBJECT_TYPE_NOT_NULL;
import static org.jsola.hr.example.TaskExample.N_DESCRIPTION;
import static org.jsola.hr.example.TaskExample.N_RUN_BEAN_NAME;
import static org.jsola.hr.example.TaskExample.N_RUN_DATE;
import static org.jsola.hr.example.TaskExample.N_RUN_PARAM;
import static org.jsola.hr.example.TaskExample.N_RUN_TYPE;
import static org.jsola.hr.example.TaskExample.N_STATUS;
import static org.jsola.hr.example.TaskExample.N_SUBJECT_ID;
import static org.jsola.hr.example.TaskExample.N_SUBJECT_TYPE;

/**
 * 人力定时任务
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【人力定时任务】的参数")
@Data
public class TaskAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_SUBJECT_TYPE, example = E_SUBJECT_TYPE, required = true)
    @NotNull(message = M_SUBJECT_TYPE_NOT_NULL)
    @Length(max = 100, message = M_SUBJECT_TYPE_MAX)
    private String subjectType;

    @ApiModelProperty(notes = N_SUBJECT_ID, example = E_SUBJECT_ID, required = true)
    @NotNull(message = M_SUBJECT_ID_NOT_NULL)
    private String subjectId;

    @ApiModelProperty(notes = N_DESCRIPTION, example = E_DESCRIPTION)
    @Length(max = 100, message = M_DESCRIPTION_MAX)
    private String description;

    @ApiModelProperty(notes = N_RUN_BEAN_NAME, example = E_RUN_BEAN_NAME, required = true)
    @NotNull(message = M_RUN_BEAN_NAME_NOT_NULL)
    @Length(max = 200, message = M_RUN_BEAN_NAME_MAX)
    private String runBeanName;

    @ApiModelProperty(notes = N_RUN_DATE, example = E_RUN_DATE, required = true)
    @NotNull(message = M_RUN_DATE_NOT_NULL)
    private Date runDate;

    @ApiModelProperty(notes = N_RUN_TYPE, example = E_RUN_TYPE)
    @Length(max = 100, message = M_RUN_TYPE_MAX)
    private String runType;

    @ApiModelProperty(notes = N_RUN_PARAM, example = E_RUN_PARAM)
    private String runParam;

    @ApiModelProperty(notes = N_STATUS, example = E_STATUS)
    private Boolean status;


}

